home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Aug 89 / X0105-MacApp 2.0ß9 BUG-Aug89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  3.4 KB  |  88 lines  |  [TEXT/GEOL]

  1. Item    7820398                         25-Aug-89        14:29
  2.  
  3. From:   D2512                           Decision Sys, Andrew C Esh,PRT
  4.  
  5. To:     MACDTS                          Macintosh Developer Tech. Supt.,APL
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    MacApp 2.0ß9 BUG
  10.  
  11. (Please pass this to your MacApp 2.0ß9 people)
  12.  
  13. Dear Fellow OOP-Heads:
  14.     I have two problems which I had to patch MacApp 2.0ß9 to fix:
  15.  
  16.     The following is a copy of my version of TCtlMgr.Free, which fixes a
  17. problem that MacApp 2.0ß9 has.  I noticed this when removing a TDialogView,
  18. which contains a TCheckBox, from a more complex view.  An area the size of the
  19. CheckBox, located the same offset from the upper left corner of the SCREE
  20. the real CheckBox is located within the WINDOW, is erased.  There is obviously
  21. a Local-To-Global missing here.  I would also rather that there is no erasure,
  22. even if it is on target.
  23.     After some tracing with TMON I discovered that SizeControl is called to set
  24. the control size to zero, so no erasure takes place when the control is
  25. disposed.  SizeControl is calling HideControl to clear the area that the
  26. control may be uncovering, if it is being made smaller.  Fair enough.  Not what
  27. TCtlMgr.Free needs, though ...
  28.  
  29. PROCEDURE TCtlMgr.Free; OVERRIDE;
  30.  
  31.    BEGIN
  32.  
  33.    IF fCMgrControl <> NIL THEN
  34.    BEGIN
  35.  
  36. (* &A&  Changed to keep SizeControl from erasing the control.
  37.         (SizeControl calls HideControl at $811EC4 in Mac II ROM)
  38.     Also, fCMgrControl is at local coordinates, not the global
  39.     coordinates that SizeControl assumes, so the erasure takes
  40.     place at the wrong location on the screen.
  41.  
  42.    SizeControl(fCMgrControl, 0, 0);{ Prevent CMgr from erasing the control! }
  43. *)
  44.    SetRect(fCMgrControl^^.contrlRect,
  45.    fCMgrControl^^.contrlRect.left, fCMgrControl^^.contrlRect.top,
  46.    fCMgrControl^^.contrlRect.left, fCMgrControl^^.contrlRect.top);
  47.    DisposeControl(fCMgrControl);
  48.  
  49.    END;
  50.  
  51.    INHERITED Free;
  52.    END;
  53.  
  54.  
  55.     I realize the way I did this probably really sucks, but it works for me, so
  56. I don't care.
  57.  
  58.     The other complaint I have is that the TGridView.IRes method inserts the
  59. rows before the columns.  This is Antilexicographical (great word!) and forces
  60. any companion storage schemes to be the same.  In my code, I overrode the row
  61. insertion routine and added code to also expand my text storage area by a row
  62. at a time, but was unable to insert the initial rows, since fNumOfCols doesn't
  63. get initialized until after InsertRowFirst gets called in the TGridView.IRes
  64. method.  Since it is more likely that whole rows will be added than whole
  65. columns, lets get fNumOfCols defined first, so the rows can be added at full
  66. width.
  67.     I fixed this by switching the order that InsertColFirst and InsertRowFirst
  68. get called: (from IRes code)
  69.  
  70.    { &A& Had to reverse these so fNumOfCols would be set before InsRowFirst }
  71.  
  72.    IF (numOfCols > 0) THEN
  73.    InsColFirst(numOfCols, colWidth);
  74.    IF (numOfRows > 0) THEN
  75.    InsRowFirst(numOfRows, rowHeight);
  76.  
  77.     This fixed my problem, and now my text storage scheme and your GridView
  78. initialization routine agree.
  79.  
  80.     By the way, when will 2.0 be finalized?
  81.  
  82.                                                - Andrew
  83.  
  84. P.S.  I just noticed another bug.  The editor for AppleLink 4.0 does not scroll
  85. the window to keep the cursor visible if the cursor goes off the top edge of
  86. the screen.  Must be something in the air today, I'm finding everything.
  87.  
  88.